package com.ruoyi.test7.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.test7.mapper.RequestStatusMapper;
import com.ruoyi.test7.domain.RequestStatus;
import com.ruoyi.test7.service.IRequestStatusService;

/**
 * statusService业务层处理
 * 
 * @author 22082109czy
 * @date 2025-07-13
 */
@Service
public class RequestStatusServiceImpl implements IRequestStatusService 
{
    @Autowired
    private RequestStatusMapper requestStatusMapper;

    public List<RequestStatus> testList() {
        return requestStatusMapper.selectAllStatus();
    }

    /**
     * 查询status
     * 
     * @param statusId status主键
     * @return status
     */
    @Override
    public RequestStatus selectRequestStatusByStatusId(Long statusId)
    {
        return requestStatusMapper.selectRequestStatusByStatusId(statusId);
    }

    /**
     * 查询status列表
     * 
     * @param requestStatus status
     * @return status
     */
    @Override
    public List<RequestStatus> selectRequestStatusList(RequestStatus requestStatus)
    {
        return requestStatusMapper.selectRequestStatusList(requestStatus);
    }

    /**
     * 新增status
     * 
     * @param requestStatus status
     * @return 结果
     */
    @Override
    public int insertRequestStatus(RequestStatus requestStatus)
    {
        return requestStatusMapper.insertRequestStatus(requestStatus);
    }

    /**
     * 修改status
     * 
     * @param requestStatus status
     * @return 结果
     */
    @Override
    public int updateRequestStatus(RequestStatus requestStatus)
    {
        return requestStatusMapper.updateRequestStatus(requestStatus);
    }

    /**
     * 批量删除status
     * 
     * @param statusIds 需要删除的status主键
     * @return 结果
     */
    @Override
    public int deleteRequestStatusByStatusIds(Long[] statusIds)
    {
        return requestStatusMapper.deleteRequestStatusByStatusIds(statusIds);
    }

    /**
     * 删除status信息
     * 
     * @param statusId status主键
     * @return 结果
     */
    @Override
    public int deleteRequestStatusByStatusId(Long statusId)
    {
        return requestStatusMapper.deleteRequestStatusByStatusId(statusId);
    }
    @Override
    public List<RequestStatus> list()
    {
        // 创建一个空的RequestStatus对象作为查询条件，表示查询所有记录
        return selectRequestStatusList(new RequestStatus());
    }
}
